Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LizandroCanul/back_sdo/llms.txt

Use this file to discover all available pages before exploring further.

Admin Only - This endpoint requires admin role. Regular users will receive a 403 Forbidden error.

Overview

Retrieve a list of all users in the system. This endpoint is restricted to administrators only and returns user information without sensitive data like passwords.

Authentication

Requires a valid JWT token with admin role.
Authorization: Bearer YOUR_JWT_TOKEN

Response

Returns an array of user objects with the following fields:
id
string (UUID)
Unique identifier for the user
email
string
User’s email address (unique)
nombreCompleto
string
User’s full name
roles
string
User role: either admin or user
isActive
boolean
Whether the user account is active
mustChangePassword
boolean
Flag indicating if user must change password on next login

Example Request

cURL
curl -X GET https://api.yucatan.gob.mx/users \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

200 Success
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "admin@yucatan.gob.mx",
    "nombreCompleto": "Juan Pérez",
    "roles": "admin",
    "isActive": true,
    "mustChangePassword": false
  },
  {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "email": "maria@yucatan.gob.mx",
    "nombreCompleto": "María González",
    "roles": "user",
    "isActive": true,
    "mustChangePassword": true
  }
]
401 Unauthorized
{
  "statusCode": 401,
  "message": "Unauthorized"
}
403 Forbidden
{
  "statusCode": 403,
  "message": "Forbidden resource",
  "error": "Forbidden"
}

Authorization Rules

  • JWT token must be valid and not expired
  • User role must be exactly admin
  • Non-admin users attempting this request will receive 403 Forbidden
  • The password field is excluded from all responses for security